﻿using BySoft.Server.Common.Entity;
using BySoft.Server.Common.Schema;
using BySoft.Server.DataAccess;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;


//==================================================================================
//
//        Copyright (C) 2014-2016 SRC Studio   
//        All rights reserved
//
//        Filename :MaterialType
//
//        Created by Administrator at  2016-05-20 22:39:13
//        http://www.seven-rosy-clouds.com
//
//        Description :  
//
//        Change History :
//
//	Version    Date                      Author           Description  
// ----------------------------------------------------------------------------------
//  	1.0  2016-05-20 22:39:13        Administrator    Created.
//   
//
//===================================================================================

namespace BySoft.Server.Business
{

    public partial class MdMaterialsmalltype : BusinessEntityBase<MdMaterialsmalltypeEntity>
    {

        public MdMaterialsmalltype()
        {
           EntityTableProperty= new EntityProperty() { 
              TableName = "MD_MaterialSmallType",
              IDString = "MaterialSmallTypeID", 
              NameString = "MaterialSmallTypeName" };
        }
     

      public static DataTable SelectList(string strMaterialTypeName, int pageIndex, int pageSize, out int count)
      {
          return MdMaterialsmalltypeDA.SelectList(strMaterialTypeName,pageIndex,pageSize,out count);
      }

      public static DataTable SelectAll()
      {
          int count = 0;
          return MdMaterialsmalltypeDA.SelectList("", 1, 10000, out count);
      }
      public static DataTable SelectByTypeID(string strTypeID,string strMaterialTypeName, int pageIndex, int pageSize, out int count)
      {
          return MdMaterialsmalltypeDA.SelectByTypeID(strTypeID,strMaterialTypeName, pageIndex, pageSize, out count);
      }

        /// <summary>
        /// 依大类取得所属小类
        /// </summary>
        /// <param name="strTypeID"></param>
        /// <returns></returns>
      public static DataTable SelectByTypeID(string strTypeID)
      {
          int count;
          return MdMaterialsmalltypeDA.SelectByTypeID(strTypeID, "",0, 10000, out count);
      }
    }
}
